package com.neuedu.springmvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 金山
 * 项目：springmvc-learn
 * site: https://blog.fulfill.com.cn
 * 描述
 * @data 2025/3/149:44
 */
@Controller
@RequestMapping("/index")
public class IndexController {


    /**
     *http://localhost:8080/web/index/index
     * @return
     */
    @ResponseBody
    // @RequestMapping("/index")


    // @RequestMapping(value="/index",method = RequestMethod.POST)

    //简写成PostMapping
    @PostMapping("/index")
    public String index(){
        System.out.println("1111 更新");
        return "success";
    }


    /**
     * http://localhost:8080/web/index
     * @return
     */
    @ResponseBody
    @RequestMapping()
    public String list(){
        return "success";
    }



}
